package org.socialnetwork.rules;

import java.util.Calendar;
import java.util.Date;

import org.abac4j.annotations.AttributeFunction;

public class TimeChecker {
	
	@AttributeFunction
	public static boolean inWorkingTime(Date date){
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(date);
		return (calendar.get(Calendar.HOUR_OF_DAY) < 18 && calendar.get(Calendar.HOUR_OF_DAY) > 7);
	}
}